<template>
  <div style="padding-bottom: 0" class="farmer-info-root flex-row full-container">
    <div  class="txt-container flex-column">
      <div class="title-container flex-row">
        <div class="title-txt">
          {{ (farmerInfo || {}).farmerName }}
        </div>
        <div class="txt-item flex-row" style="margin-left: 20px">
          <div class="label">
            编号：
          </div>
          <div class="value">
            {{ (farmerInfo || {}).farmerNo }}
          </div>
        </div>
        <div class="txt-item flex-row">
          <div class="label">
            身份证号码：
          </div>
          <div class="value">
            {{ (farmerInfo || {}).farmerIdentity }}
          </div>
        </div>
      </div>
      <div class="other-txt-container flex-row">
        <div class="txt-item flex-row">
          <div class="label">
            保险生效时间：
          </div>
          <div class="value">
            {{ (farmerInfo || {}).startTime }}
          </div>
        </div>
        <div class="txt-item flex-row">
          <div class="label">
            保险失效时间：
          </div>
          <div class="value">
            {{ (farmerInfo || {}).endTime }}
          </div>
        </div>
        <div class="txt-item flex-row">
          <div class="label">
            承保总面积：
          </div>
          <div class="value">
            {{ (farmerInfo || {}).insureArea }}
          </div>
        </div>
        <div class="txt-item flex-row">
          <div class="label">
            投保总额：
          </div>
          <div class="value">
            {{ (farmerInfo || {}).insureMoney }}
          </div>
        </div>
      </div>
      <div class="other-txt-container flex-row">
        <div class="txt-item flex-row">
          <div class="label important-txt">
            受灾面积：
          </div>
          <div class="value important-txt">
            {{ (farmerInfo || {}).sumArea }}亩
          </div>
        </div>
        <div class="txt-item flex-row">
          <div class="label important-txt">
            赔付额：
          </div>
          <div class="value important-txt">
            {{ (farmerInfo || {}).sumMoney }}元
          </div>
        </div>
      </div>
      <div class="other-txt-container flex-row">
        <div class="txt-item flex-row">
          <div class="label">
            赔付额计算方式：[(投保总额 ÷ 投保总面积) x 受灾面积 x 保险赔付比 ]
          </div>
<!--          <div class="value important-txt">-->
<!--            {{`(${(farmerInfo || {}).insureMoney } ÷ ${(farmerInfo || {}).insureArea }) x ${(farmerInfo || {}).sumArea } x ${(farmerInfo || {}).compensateRatio } = ${(farmerInfo || {}).sumMoney}`}}-->
<!--          </div>-->
        </div>

      </div>
      <div class="other-txt-container flex-row">
        <div class="txt-item flex-row">
          <div class="label important-txt">
            {{`(${(farmerInfo || {}).insureMoney } ÷ ${(farmerInfo || {}).insureArea }) x ${(farmerInfo || {}).sumArea } x ${(farmerInfo || {}).compensateRatio } = ${(farmerInfo || {}).sumMoney}`}}
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import {HANDLE_TYPE, SEX_CONFIG} from "@/views/business/constantData";

export default {
  props: {
    farmerInfo: {
      type: Object,
      default: () => {
        return {}
      }
    },
  },
  data() {
    return {
      HANDLE_TYPE,
      SEX_CONFIG,
    }
  },
  methods: {
    changeFarmer() {
      this.$emit('changeFarmer')
    }
  }
}
</script>

<style scoped lang="scss">
.farmer-info-root{
  .txt-container {
    width: 100% !important;
  }
}
</style>
